home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pipnss / nsIKeygenThread.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  132 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIKeygenThread.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIKeygenThread_h__
  6. #define __gen_nsIKeygenThread_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIObserver; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIKeygenThread */
  21. #define NS_IKEYGENTHREAD_IID_STR "8712a243-5539-447c-9f47-8653f40c3a09"
  22.  
  23. #define NS_IKEYGENTHREAD_IID \
  24.   {0x8712a243, 0x5539, 0x447c, \
  25.     { 0x9f, 0x47, 0x86, 0x53, 0xf4, 0x0c, 0x3a, 0x09 }}
  26.  
  27. /**
  28.  * nsIKeygenThread
  29.  *  This is used to communicate with the thread generating a key pair,
  30.  *  to be used by the dialog displaying status information.
  31.  */
  32. class NS_NO_VTABLE nsIKeygenThread : public nsISupports {
  33.  public: 
  34.  
  35.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IKEYGENTHREAD_IID)
  36.  
  37.   /**
  38.    * startKeyGeneration - run the thread
  39.    *   A user interface using this interface needs to
  40.    *   call this method as soon as the status information
  41.    *   is displaying. This will trigger key generation.
  42.    *   To allow the closure of the status information,
  43.    *   the thread needs a handle to an observer.
  44.    *
  45.    *   observer will be called on the UI thread.
  46.    *   When the key generation is done, the observe method will
  47.    *   be called with a topic of "keygen-finished" and null data
  48.    *   and subject.
  49.    */
  50.   /* void startKeyGeneration (in nsIObserver observer); */
  51.   NS_IMETHOD StartKeyGeneration(nsIObserver *observer) = 0;
  52.  
  53.   /**
  54.    * userCanceled - notify the thread
  55.    *   If the user canceled, the thread is no longer allowed to
  56.    *   close the dialog. However, if the thread already closed
  57.    *   it, we are not allowed to close it.
  58.    */
  59.   /* void userCanceled (out boolean threadAlreadyClosedDialog); */
  60.   NS_IMETHOD UserCanceled(PRBool *threadAlreadyClosedDialog) = 0;
  61.  
  62. };
  63.  
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSIKEYGENTHREAD \
  66.   NS_IMETHOD StartKeyGeneration(nsIObserver *observer); \
  67.   NS_IMETHOD UserCanceled(PRBool *threadAlreadyClosedDialog); 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  70. #define NS_FORWARD_NSIKEYGENTHREAD(_to) \
  71.   NS_IMETHOD StartKeyGeneration(nsIObserver *observer) { return _to StartKeyGeneration(observer); } \
  72.   NS_IMETHOD UserCanceled(PRBool *threadAlreadyClosedDialog) { return _to UserCanceled(threadAlreadyClosedDialog); } 
  73.  
  74. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  75. #define NS_FORWARD_SAFE_NSIKEYGENTHREAD(_to) \
  76.   NS_IMETHOD StartKeyGeneration(nsIObserver *observer) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartKeyGeneration(observer); } \
  77.   NS_IMETHOD UserCanceled(PRBool *threadAlreadyClosedDialog) { return !_to ? NS_ERROR_NULL_POINTER : _to->UserCanceled(threadAlreadyClosedDialog); } 
  78.  
  79. #if 0
  80. /* Use the code below as a template for the implementation class for this interface. */
  81.  
  82. /* Header file */
  83. class nsKeygenThread : public nsIKeygenThread
  84. {
  85. public:
  86.   NS_DECL_ISUPPORTS
  87.   NS_DECL_NSIKEYGENTHREAD
  88.  
  89.   nsKeygenThread();
  90.  
  91. private:
  92.   ~nsKeygenThread();
  93.  
  94. protected:
  95.   /* additional members */
  96. };
  97.  
  98. /* Implementation file */
  99. NS_IMPL_ISUPPORTS1(nsKeygenThread, nsIKeygenThread)
  100.  
  101. nsKeygenThread::nsKeygenThread()
  102. {
  103.   /* member initializers and constructor code */
  104. }
  105.  
  106. nsKeygenThread::~nsKeygenThread()
  107. {
  108.   /* destructor code */
  109. }
  110.  
  111. /* void startKeyGeneration (in nsIObserver observer); */
  112. NS_IMETHODIMP nsKeygenThread::StartKeyGeneration(nsIObserver *observer)
  113. {
  114.     return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116.  
  117. /* void userCanceled (out boolean threadAlreadyClosedDialog); */
  118. NS_IMETHODIMP nsKeygenThread::UserCanceled(PRBool *threadAlreadyClosedDialog)
  119. {
  120.     return NS_ERROR_NOT_IMPLEMENTED;
  121. }
  122.  
  123. /* End of implementation class template. */
  124. #endif
  125.  
  126. // {195763b8-1dd2-11b2-a843-eb44e44aaa37}
  127. #define NS_KEYGENTHREAD_CID \
  128. { 0x195763b8, 0x1dd2, 0x11b2, { 0xa8, 0x43, 0xeb, 0x44, 0xe4, 0x4a, 0xaa, 0x37 } }
  129. #define NS_KEYGENTHREAD_CONTRACTID "@mozilla.org/security/keygenthread;1"
  130.  
  131. #endif /* __gen_nsIKeygenThread_h__ */
  132.